<template>
  <div class="not-have">
    <div class="img">
      <img src="http://xcxcdn.shuiqoo.cn/empty_box.png" alt="">
    </div>
    <div v-if="text" class="text">
      {{text}}
    </div>
    <div v-if="btn" class="btn">
      <div  
           @click="goTo"> {{btn}}</div>
    </div>
  </div>
</template>

<script>
  export default {
    props: ['btn', 'text'],
    data () {
      return {}
    },
    computed: {
      store () {
        return this.$store.state
      }
    },
    methods: {
      goTo (index) {
        this.$emit('btnClick', index)
      }
    },
    mounted () {
      console.log(12312)
      this.inType = 0
    }
  }
</script>

<style lang="scss" type="text/scss">
  @import '../common/scss/base.scss';

  /**
    商品为空默认图片
    */
  .not-have {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding-top: 240px;
    text-align: center;
    box-sizing: border-box;
    img {
      @include wh(427, 432);
      margin: auto;
    }
    .text {
      position: relative;
      top: -66px;
      @include color999;
      @include fontSize(28);
      margin-bottom: 44px;
    }
    .btn {
      position: relative;
      top: -66px;
      > div {
        @include wh(218, 54);
        @include fjc(center);
        @include fontSize(28);
        background: $primaryColor;
        border-radius: 8px;
        color: #fff;
        margin: auto;
      }

    }
  }

</style>
